<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<input type="hidden" name="zh_parsen/fzr_name" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name"/>"/>
<input type="hidden" name="zh_parsen/fzr_mobile" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile"/>"/>
<input type="hidden" name="zh_parsen/fzr_tel" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work"/>"/>
<input type="hidden" name="zh_parsen/fzr_email" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email"/>"/>

<input type="hidden" id="if_have_org" name="proposal/if_have_org">
<div class="t_bar"><span class="color_red">*</span>单位数据完善</div>
	<table class="t_css" width="100%" id="basic_info_dwsj" border="0" cellpadding="0"
	    cellspacing="1">
	<col style="width: 25%"/>
	<col style="width: 25%"/>
	<col style="width: 25%"/>
	<col style="width: 25%"/>
	    <tr class="li_1">
	        <td align="right">机构名称：</td>
	        <td colspan="3">
	        	<input type='text' name='proposal/zh_title' id='zh_title' style="width: 80%" class="input_css required" maxlength="100" value='<x:out select="$xmlData/data/proposal/zh_title"/>' label="机构名称">
	        </td>
	    </tr>
	    <tr>
			<td align="right" nowrap>项目类别：</td>
			<td colspan="3">
				<span name="proposal/sub_grant_name"><x:out select="$xmlData/data/proposal/sub_grant_name" /></span>
				<%-- <span name="organizations/organization/org_name"><x:out select="$xmlData/data/organizations/organization[@submit_org='1']/org_name" /></span> --%>
			</td>
		</tr>
		<tr>
			<td align="right" nowrap>单位地址：</td>
			<td colspan="3">
				<span name="organizations/organization/address"><x:out select="$xmlData/data/organizations/organization[@submit_org='1']/address" /></span>
			</td>
		</tr>
		<tr>
		    <td  align="right" >申报日期：</td>
			<td >
				<c:set var="submit_date"><x:out select="$xmlData/data/proposal/submit_date" /></c:set>
				<cpt:date id="submit_date" size="10" name="proposal/submit_date" value="${submit_date}" className=" required date " label="申报日期"></cpt:date> 
			</td>
	        <td align="right">归口管理部门：</td>
	        <td >
	        	<c:set var="recomend_org">{'id':'<x:out select="$xmlData/data/proposal/recomend_org_value" />','name':'<x:out select="$xmlData/data/proposal/recomend_org_name" />'}</c:set>
				<cpt:tree key="recommended_org" cacheable="false" className="hn_iuput_kuang " readonly="true" value="${recomend_org}"  label="归口管理部门"
         			id="recomend_org"  showPattern="all" shieldPattern="0" topCheckbox="false" onClick="initTreeValueExt" />
				<input type="hidden" id="recomend_org_value" name="proposal/recomend_org_value"  class="required"  value="<x:out select="$xmlData/data/proposal/recomend_org_value" />" label="归口管理部门">
				<input type="hidden" name="proposal/recomend_org_name" value="<x:out select="$xmlData/data/proposal/recomend_org_name" />">
	        </td>
	    </tr>
	    
	    <tr >
	        <td align="right">是否在安徽省拥有独立法人资格： </td>
	        <td colspan="3">
				<c:set var="fr_zg"><x:out select="$xmlData/data/proposal/fr_zg_value" /></c:set>
				<cpt:checkbox key="tech_yesno" tagType="radio" name="fr_zg"  value="${fr_zg }" width="220px;" repeatColumn="3" onClick="initControlValue(this.id);" style="border: 0px; padding: 0px; margin: 0px;float:left;" ></cpt:checkbox>
				<input type="hidden" id="fr_zg_value" name="proposal/fr_zg_value"  class="required"  value="<x:out select="$xmlData/data/proposal/fr_zg_value" />" label="是否在安徽省拥有独立法人资格">
				<input type="hidden" name="proposal/fr_zg_name" value="<x:out select="$xmlData/data/proposal/fr_zg_name" />">
			</td>
	    </tr>
	    <!-- <tr style="display: none;"></tr> -->
	    <tr >
	        <td align="right">法人性质： </td>
	        <td colspan="3">
				<c:set var="fr_type"><x:out select="$xmlData/data/proposal/fr_type_value" /></c:set>
				<cpt:checkbox key="fr_type" tagType="radio" name="fr_type"  value="${fr_type }" width="220px;" repeatColumn="3" onClick="initControlValue(this.id);" style="border: 0px; padding: 0px; margin: 0px;float:left;" ></cpt:checkbox>
				<input type="hidden" id="fr_type_value" name="proposal/fr_type_value"  class="required"  value="<x:out select="$xmlData/data/proposal/fr_type_value" />" label="法人性质">
				<input type="hidden" name="proposal/fr_type_name" value="<x:out select="$xmlData/data/proposal/fr_type_name" />">
			</td>
	    </tr>
	    
	    <tr>
	    	<td align="right">法人登记证书编号：</td>
			<td>
				<span name="organizations/organization/org_licence">
					<x:out
						select="$xmlData/data/organizations/organization[@submit_org='1']/org_licence" />
				</span>
			</td>
			<td align="right">组织机构代码（统一社会信用代码）：</td>
			<c:set var="org_shxy_no">
				<x:out
					select="$xmlData/data/organizations/organization[@submit_org='1']/org_shxy_no" />
			</c:set>
			<c:if test="${empty org_shxy_no }">
				<c:set var="org_shxy_no">
					<x:out
						select="$xmlData/data/organizations/organization[@submit_org='1']/org_no" />
				</c:set>
			</c:if>
			<td>
				<span name="organizations/organization/org_no">${org_shxy_no}</span>
			</td>
		</tr>
		
		
		<tr >
	        <td align="right">技术领域： </td>
	        <td colspan="3">
	        	<c:set var="researcharea_other"><x:out select="$xmlData/data/proposal/researcharea_other" /></c:set>
				<c:set var="researcharea"><x:out select="$xmlData/data/proposal/researcharea_value" /></c:set>
				<cpt:checkbox key="researcharea_xxyfjg" name="researcharea"  value="${researcharea }" width="220px;" repeatColumn="3" onClick="initControlValue(this.id);" style="border: 0px; padding: 0px; margin: 0px;float:left;" 
				lastOther="true" otherId="researcharea_other" otherValueName="${researcharea_other }"></cpt:checkbox>
				<input type="hidden" id="researcharea_value" name="proposal/researcharea_value"  class="required"  value="<x:out select="$xmlData/data/proposal/researcharea_value" />" label="技术领域">
				<input type="hidden" name="proposal/researcharea_name" value="<x:out select="$xmlData/data/proposal/researcharea_name" />">
				<input type="text" id="researcharea_other" name="proposal/researcharea_other"  maxlength="50" class="input_css "  value="<x:out select="$xmlData/data/proposal/researcharea_other" />" label="技术领域-->传统行业改造提升">
			</td>
	    </tr>
	    
	    
	    <tr >
	        <td align="right">主要功能 ： </td>
	        <td colspan="3">
				<c:set var="major_funciton"><x:out select="$xmlData/data/proposal/major_funciton_value" /></c:set>
				<cpt:checkbox key="major_funciton"  name="major_funciton"  value="${major_funciton }" width="220px;" repeatColumn="3" onClick="initControlValue(this.id);" style="border: 0px; padding: 0px; margin: 0px;float:left;" ></cpt:checkbox>
				<input type="hidden" id="major_funciton_value" name="proposal/major_funciton_value"  class="required"  value="<x:out select="$xmlData/data/proposal/major_funciton_value" />" label="主要功能 ">
				<input type="hidden" name="proposal/major_funciton_name" value="<x:out select="$xmlData/data/proposal/major_funciton_name" />">
			</td>
	    </tr>
	    
	    
	    
	    <tr>
			<td align="right">注册时间：</td>
			<td align="center">
				<span name="organizations/organization/registe_date">
					<x:out
						select="$xmlData/data/organizations/organization[@submit_org='1']/registe_date" />
				</span>
			</td>
			<td align="right">注册资金：</td>
			<td align="center">
				<span name="organizations/organization/registe_fund">
					<x:out select="$xmlData/data/org_basic_info/registe_fund" />万<x:out select="$xmlData/data/organizations/organization[@submit_org='1']/registe_fund_money_name" />
				</span>
			</td>
		</tr>
	    <%--  <tr>
	    	<td align="right">职称：</td>
	    	<td>
	    		<span name="proposal/contact_prof_title_name"> 
			    	<x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_prof_title_name"/>
		    	</span>
	    	</td>
	    	<td align="right">职务：</td>
	    	<td>
	    		<span name="proposal/contact_position"> 
			    	<x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_position" /> 
		    	</span>
	    	</td>
	    </tr>
	     <tr>
	    	<td align="right">办公电话：</td>
	    	<td>
		    	<span name="proposal/contact_tel"> 
			    	<x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_tel"/>
		    	</span>
	    	</td>
	    	<td align="right">电子邮箱：</td>
	    	<td>
	    		<span name="proposal/contact_email"> 
			    	<x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_email" /> 
		    	</span>
	    	</td>
	    </tr> --%>
	    
	    
	    <%-- <tr>
	    	<td align="right">传真：</td>
	    	<td>
	    		<span name="proposal/contact_fax"> 
			    	<x:out select="$xmlData/data/organization/contact_info/contact_fax" /> 
		    	</span>
	    	</td>
	    	
	    </tr> --%>
	    <%-- <tr>
	    	<td align="right">项目开始时间：</td>
	    	<td>
		    	<c:set var="start_date"><x:out select="$xmlData/data/proposal/start_date"/></c:set>
				<cpt:date id="start_date" name="proposal/start_date" label="项目开始时间" value="${start_date }" className=" required  date  "  size="15" ></cpt:date>
	    	</td>
	    	<td align="right">项目结束时间：</td>
	    	<td>
		    	<c:set var="end_date"><x:out select="$xmlData/data/proposal/end_date"/></c:set>
				<cpt:date id="end_date" name="proposal/end_date" label="项目结束时间" value="${end_date }" className=" required  date dateCompareAfterE:end_date:start_date "  size="15" ></cpt:date>
	    	</td>
	    </tr> --%>
	    <%-- <tr>
	    	<td align="right">项目报审级次：<br/>（省补助资金拨付所属财政局）</td>
	        <td >
				<c:set var="sub_step">{'id':'<x:out select="$xmlData/data/proposal/sub_step_value" />','name':'<x:out select="$xmlData/data/proposal/sub_step_name" />'}</c:set>
	          	<cpt:tree key="sub_step" cacheable="false" className="hn_iuput_kuang  " readonly="true" value="${sub_step}"  label="项目报审级次" 
	          		id="sub_step" onlyChooseLeaf="false" showPattern="all" shieldPattern="0" topCheckbox="true" onClick="initTreeValueExt" />
		        <input id="sub_step_value" type="hidden" name="proposal/sub_step_value" class="required" label="项目报审级次" value="<x:out select="$xmlData/data/proposal/sub_step_value" />"/>
	            <input id="sub_step_name" type="hidden" name="proposal/sub_step_name"  value="<x:out select="$xmlData/data/proposal/sub_step_name" />"/>
			</td>
			<td align="right">项目申请金额（万元）：</td>
	    	<td>
	    		<input type='text' name='proposal/request_money' class="required" id='request_money' onfocus="InitInput.setNumber(this,9,4,2)" style="text-align: right;" value='<x:out select="$xmlData/data/proposal/request_money"/>' label="项目申请金额">
	    	</td>
	    </tr> --%>
	    <%-- <tr>
	    	<td>主要目标主要任务考核指标（限300字）：</td>
	    	<td colspan="3">
	    		<textarea name="project/tech_assign" style="width:98%" class="input_textarea required  maxlength:300" label="主要目标主要任务考核指标"   rows=5 cols=60><x:out select="$xmlData/data/project/tech_assign" /></textarea>
				<input type="hidden" name="project/tech_assign_hidden" id="project/tech_assign_hidden" value="<x:out select="$xmlData/data/project/project/tech_assign_hidden" />"/>
	    	</td>
	    </tr> --%>
	</table>
	<br/>
	<div class="t_bar">股东（或出资方）构成 </div>
	<table  id="gdgc" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
		<thead >
					<tr style="border:1px solid #B7D1E6">
						<th class="TblHead" align="center"  width="5%">选择</th>
						<th class="TblHead" align="center"  width="5%">序号</th>
						<th class="TblHead" align="center"  width="30%">股东（或出资方）名称</th>
						<th class="TblHead" align="center"  width="20%">股权比例（%）</th>
						<th class="TblHead" align="center"  width="20%">投资金额（万元）</th> 
						<th class="TblHead" align="center"  width="20%">股东类型</th>
					</tr>
			</thead>
			<input type="hidden" value="0.00" id="compareZero">
			<input type="hidden" value="100.00" id="compareHundred">
			<tbody id="tab">
					<tr style="display:none">
						<td align="center">
							<input type="radio" style="border: 0px;background-color: white;" class="radiobutton" name="selshareholders" >
						</td>
						<td align="center">
							<span name="shareholders|shareholder[0]@seq_no" >[index]</span> 
						</td>
						<td align="center">
							<input  id="shareholder_name_[0]" name="shareholders|shareholder[0]|shareholder_name" label="股东（或出资方）名称" maxlength="100" value="" class=" required input_text" style="width:80%"  />
						</td>
						<td align="center">
							<input  id="shareholder_part_[0]" name="shareholders|shareholder[0]|shareholder_part" label="股权比例" onfocus="InitInput.setNumber(this,3,2,2);" maxlength="100" value="" class=" required input_text valueGNum:shareholder_part_[0]:0.00 valueLENum:shareholder_part_[0]:100.00" style="width:80%;text-align: right;"  />
						</td>
						<td align="center">
							<input  id="fee_out_[0]" name="shareholders|shareholder[0]|fee_out" label="投资金额" value="" onfocus="InitInput.setNumber(this,9,2,2);" class=" required input_text" style="width:80%;text-align: right;"  />
						</td>
						<td align="center">
							<cpt:select id="shareholder_type_[index]"   key="shareholder_type" style="width:70%;" name="shareholder_type"  value="" onChange="initControlValue(this.id);"></cpt:select>
							<input type="hidden" name="shareholders|shareholder[0]|shareholder_type_value" class="required" value="" label="股东类型">
							<input type="hidden" name="shareholders|shareholder[0]|shareholder_type_name" value="">
						</td>
					</tr>
					
					
					<c:set value="0" var="index" scope="page"/>
					<x:forEach select="$xmlData/data/shareholders/shareholder" var="shareholder">
					
					<c:choose>
						<c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
						<c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
					</c:choose>
					<tr >
						<td align="center">
							<input type="radio" style="border: 0px;background-color: white;" class="radiobutton" name="selshareholders" >
						</td>
						<td align="center">
							<span   name="shareholders/shareholder[${flag}${index}]@seq_no" ><x:out select="$shareholder/@seq_no"/></span> 
						</td>
						<td align="center">
							<input  id="shareholder_name_[${flag}${index}]" name="shareholders/shareholder[${flag}${index}]/shareholder_name" label="股东（或出资方）名称" maxlength="100" value="<x:out select="$shareholder/shareholder_name"/>" class=" required input_text" style="width:80%"  />
						</td>
						<td align="center">
							<input  id="shareholder_part_[${flag}${index}]" name="shareholders/shareholder[${flag}${index}]/shareholder_part" label="股权比例" maxlength="100" value="<x:out select="$shareholder/shareholder_part"/>" onfocus="InitInput.setNumber(this,3,2,2);" class=" required input_text valueGNum:shareholder_part_[${flag}${index}]:0.00 valueLENum:shareholder_part_[${flag}${index}]:100.00" style="width:80%;text-align: right;"  />
						</td>
						<td align="center">
							<input  id="fee_out_[${flag}${index}]" name="shareholders/shareholder[${flag}${index}]/fee_out" label="投资金额" value="<x:out select="$shareholder/fee_out"/>" onfocus="InitInput.setNumber(this,9,2,2);" class=" required input_text" style="width:80%;text-align: right;"  />
						</td>
						<td align="center">
							<c:set var="shareholder_type"><x:out select="$shareholder/shareholder_type_value" /></c:set>
							<cpt:select id="shareholder_type_${flag}${index}" name="shareholder_type"  key="shareholder_type" style="width:70%;" value="${shareholder_type}" onChange="initControlValue(this.id);"></cpt:select>
							<input type="hidden" name="shareholders/shareholder[${flag}${index}]/shareholder_type_value" class="required" value="${shareholder_type}" label="股东类型">
							<input type="hidden" name="shareholders/shareholder[${flag}${index}]/shareholder_type_name" value="<x:out select="$shareholder/shareholder_type_name" />">
						</td>
					</tr>
					<c:set value="${index+1}" var="index" scope="page"/>
					</x:forEach>
				</tbody>
					</table>
					
					<table id="jbutton" width="98%" align="center" border="0" cellspacing="0" cellpadding="0" style="border:0;">
					<tr ><td>
					<input class="button_02" id="tianjia" name="cmdAddbefore" type=button value="添加" onclick="if(checkTabLimit('gdgc',999,'股东（或出资方）构成 最多只能填写999条')){addNewRow('gdgc');showDateTag('gdgc');}try{top.resizeFrame();}catch(e){};changeCss('gdgc');">
					<input class="button_02" name="cmdMovePrev" type=button value="上移" onclick="movePrev('gdgc','selshareholders');changeCss('gdgc');">
					<input class="button_02" name="cmdMoveNext" type=button value="下移" onclick="moveNext('gdgc','selshareholders');changeCss('gdgc');">
					<input class="button_02" name="cmddel" type=button  value="删除" onclick="deleteSelectedRow('gdgc','股东（或出资方）构成 ');changeCss('gdgc')">
					</td></tr>
	</table>
	
<script type="text/javascript">

function initTreeValueExt(treeId, treeNode) {
 	if ((treeNode && treeNode.isParent)) {
 		scmWarn("请选择具体的" + $("#" + treeId).attr("label"));
 		$("#" + treeId).val("");
 		$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val("");
 		$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId	+ "_value']").val("");
 		$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val("");
 		return false;
 	}
 	var str = treeNode.name;
 	var obj = treeNode.parentNode;
 	while (obj != null) {
 		str = obj.name + "-" + str;
 		obj = obj.parentNode;
 	}
 	
 	$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val(treeNode.id);
 	$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(treeNode.id);
 	$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(str);
 }
 
	function changeCss(id) {
		$("#"+id+">tbody>tr:odd").each(function(){
			$(this).removeClass().addClass("li_1");
		});
		$("#"+id+">tbody>tr:even").each(function(){
			$(this).removeClass().addClass("li_2");
		});
	}
	
	
 
 function ContentDownDesc(template)
	{
		window.open('${res_app}/template/content/'+encodeURIComponent(template),'','resizable=yes,height=700,width=1000,scrollbars=yes,status=yes')
		return false;
	}
</script>		
